<!DOCTYPE html>
<html>
<head>
	<title>1123</title>
</head>
<body>

</body>
<script type="text/javascript">
	function sum(x){
		if(arguments.length == 2){
			retrun arguments[0] + arguments[1]
		}else{
			retrun function(y){retrun x + y}
		}
	}
	console.log(sum(2,3))
	console.log(sum(2)(3))
</script>
</html>